    /*  
    championBuilder - Champions Online character planner.
    Copyright (C) 2009 Moritz Hartmeier
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    You can find the GNU General Public License in the data folder.
    */


package ch.zarzu.champions.builder.gui;

import javax.swing.JLayeredPane;
import javax.swing.SpringLayout;

public class InfoPane extends JLayeredPane {
    private SpringLayout layout;
    private TitlePhrase text;
    
    public InfoPane() {
        layout = new SpringLayout();
        setLayout(layout);
        
        draw();
    }
    
    private void draw() {
        redraw("changing language - please wait");
    }
    
    public void redraw(String content) {
        removeAll();
        
        text = new TitlePhrase(content, "medium");
        
        add(text);
        layout.putConstraint(SpringLayout.WEST, text, 350, SpringLayout.WEST, this);
        layout.putConstraint(SpringLayout.NORTH, text, 300, SpringLayout.NORTH, this);
        layout.putConstraint(SpringLayout.SOUTH, this, 0, SpringLayout.SOUTH, text);
    }
}